package com.wulin.library.repository;

import com.wulin.library.entity.Book;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface BookMapper {

    @Select("SELECT * FROM book")
    List<Book> getAllBook();

    @Select("SELECT * FROM book WHERE book_id = #{bookId}")
    Book getBookById(Integer bookId);

    void insertBook(Book book);

    void deleteBook(Integer bookId);

}
